package com.freight.tws.api.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.freight.common.core.annotation.Excel;
import com.freight.common.core.web.domain.MyPlusEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 支付对象 tws_payment
 * 
 * @author ruoyi
 * @date 2023-02-23
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("tws_payment")
public class Payment extends MyPlusEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 支付单号（资金单号） */
    @Excel(name = "支付单号")
    private String documentNumber;

    /** 实际承运人名称 */
    @Excel(name = "实际承运人名称")
    private String carrier;

    /** 统一社会信用代码或证件号码 */
    @Excel(name = "统一社会信用代码或证件号码")
    private String actualCarrierId;

    /** 车牌号 */
    @Excel(name = "车牌号")
    private String vehicleNumber;

    /** 车牌颜色 */
    @Excel(name = "车牌颜色")
    private String vehiclePlateColorCode;

    /** vid */
    @Excel(name = "司机id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long driverId;

    /** 司机姓名 */
    @Excel(name = "司机姓名")
    private String driverName;

    /** 订单数 */
    @Excel(name = "订单数")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderTotal;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal monetaryAmount;

    /** 申请人 */
    @Excel(name = "申请人")
    private String applyUserName;

    /** 支付人id */
    @Excel(name = "支付人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long payUserId;

    /** 支付人 */
    @Excel(name = "支付人")
    private String payUserName;

    /** 支付日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payDate;

    /** 支付方式(1线下 2线上) */
    @Excel(name = "支付方式(1线下 2线上)")
    private String payType;

    /** 付款方式代码 */
    @Excel(name = "付款方式代码")
    private String paymentMeansCode;

    /** 收款方名称 */
    @Excel(name = "收款方名称")
    private String recipient;

    /** 收款帐户信息 */
    @Excel(name = "收款帐户信息")
    private String receiptAccount;

    /** 收款方银行代码 */
    @Excel(name = "收款方银行代码")
    private String bankCode;

    /** 流水号 */
    @Excel(name = "流水号")
    private String sequenceCode;

    /** 状态 */
    @Excel(name = "1：已申请 2：已支付 3：已撤销")
    private String status;

    /** 是否已上传 1未上传 2已上传 */
    @Excel(name = "是否已上传 1未上传 2已上传")
    private String isSendToPro;

    /** 资金流水单上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "资金流水单上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendToProDateTime;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String tenantId;

    /** 物流公司名称 */
    private String companyName;

    // 支付订单
    @TableField(exist = false)
    private List<PaymentOrder> paymentOrders;

}
